import request from '@/utils/request'

export function addProduct(data) {
  return request({
    url: '/product/addProduct',
    method: 'post',
    data
  })
}


export function getProductPage(data) {
    return request({
      url: '/product/getProductPage',
      method: 'post',
      data
    })
  }

  export function setOnline(data) {
    return request({
      url: '/product/setOnline',
      method: 'post',
      data
    })
  }

  export function updateStock(data) {
    return request({
      url: '/product/updateStock',
      method: 'post',
      data
    })
  }

  export function getProductInfo(data) {
    return request({
      url: '/product/getProductInfo',
      method: 'post',
      data
    })
  }

  export function deleteProduct(data) {
    return request({
      url: '/product/delete',
      method: 'post',
      data
    })
  }

  export function editProduct(data) {
    return request({
      url: '/product/editProduct',
      method: 'post',
      data
    })
  }

  export function getAllProduct(data) {
    return request({
      url: '/product/getAvailableProduct',
      method: 'post',
      data
    })
  }
  export function getOrderListPage(data) {
   return request({
     url: '/product/getProductOrderPage',
     method: 'post',
     data
   })
  }

